3.2.74 \(\int \frac {\tan ^5(a+b \log (c x^n))}{x} \, dx\) [174]

3.2.74.1 Optimal result
3.2.74.2 Mathematica [A] (verified)
3.2.74.3 Rubi [A] (verified)
3.2.74.4 Maple [A] (verified)
3.2.74.5 Fricas [B] (verification not implemented)
3.2.74.6 Sympy [A] (verification not implemented)
3.2.74.7 Maxima [B] (verification not implemented)
3.2.74.8 Giac [F(-1)]
3.2.74.9 Mupad [B] (verification not implemented)

3.2.74.1 Optimal result

Integrand size = 17, antiderivative size = 67 \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {\log \left (\cos \left (a+b \log \left (c x^n\right )\right )\right )}{b n}-\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b n}+\frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b n} \]

output
-ln(cos(a+b*ln(c*x^n)))/b/n-1/2*tan(a+b*ln(c*x^n))^2/b/n+1/4*tan(a+b*ln(c* 
x^n))^4/b/n
 
3.2.74.2 Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.82 \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {4 \log \left (\cos \left (a+b \log \left (c x^n\right )\right )\right )+2 \tan ^2\left (a+b \log \left (c x^n\right )\right )-\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b n} \]

input
Integrate[Tan[a + b*Log[c*x^n]]^5/x,x]
 
output
-1/4*(4*Log[Cos[a + b*Log[c*x^n]]] + 2*Tan[a + b*Log[c*x^n]]^2 - Tan[a + b 
*Log[c*x^n]]^4)/(b*n)
 
3.2.74.3 Rubi [A] (verified)

Time = 0.34 (sec) , antiderivative size = 62, normalized size of antiderivative = 0.93, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.412, Rules used = {3039, 3042, 3954, 3042, 3954, 3042, 3956}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx\)

\(\Big \downarrow \) 3039

\(\displaystyle \frac {\int \tan ^5\left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \tan \left (a+b \log \left (c x^n\right )\right )^5d\log \left (c x^n\right )}{n}\)

\(\Big \downarrow \) 3954

\(\displaystyle \frac {\frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b}-\int \tan ^3\left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )}{n}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b}-\int \tan \left (a+b \log \left (c x^n\right )\right )^3d\log \left (c x^n\right )}{n}\)

\(\Big \downarrow \) 3954

\(\displaystyle \frac {\int \tan \left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )+\frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b}-\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b}}{n}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \tan \left (a+b \log \left (c x^n\right )\right )d\log \left (c x^n\right )+\frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b}-\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b}}{n}\)

\(\Big \downarrow \) 3956

\(\displaystyle \frac {\frac {\tan ^4\left (a+b \log \left (c x^n\right )\right )}{4 b}-\frac {\tan ^2\left (a+b \log \left (c x^n\right )\right )}{2 b}-\frac {\log \left (\cos \left (a+b \log \left (c x^n\right )\right )\right )}{b}}{n}\)

input
Int[Tan[a + b*Log[c*x^n]]^5/x,x]
 
output
(-(Log[Cos[a + b*Log[c*x^n]]]/b) - Tan[a + b*Log[c*x^n]]^2/(2*b) + Tan[a + 
 b*Log[c*x^n]]^4/(4*b))/n
 

3.2.74.3.1 Defintions of rubi rules used

rule 3039
Int[u_, x_Symbol] :> With[{lst = FunctionOfLog[Cancel[x*u], x]}, Simp[1/lst 
[[3]]   Subst[Int[lst[[1]], x], x, Log[lst[[2]]]], x] /;  !FalseQ[lst]] /; 
NonsumQ[u]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3954
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b*((b*Tan[c + d 
*x])^(n - 1)/(d*(n - 1))), x] - Simp[b^2   Int[(b*Tan[c + d*x])^(n - 2), x] 
, x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1]
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 
3.2.74.4 Maple [A] (verified)

Time = 0.64 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.85

method result size
derivativedivides \(\frac {\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{4}}{4}-\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{2}+\frac {\ln \left (1+{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}\right )}{2}}{n b}\) \(57\)
default \(\frac {\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{4}}{4}-\frac {{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{2}+\frac {\ln \left (1+{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}\right )}{2}}{n b}\) \(57\)
parallelrisch \(-\frac {-{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{4}+2 {\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}-2 \ln \left (1+{\tan \left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}\right )}{4 b n}\) \(58\)
risch \(-i \ln \left (x \right )+\frac {2 i a}{n b}+\frac {2 i \ln \left (c \right )}{n}+\frac {2 i \ln \left (x^{n}\right )}{n}-\frac {\pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{n}+\frac {\pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{n}+\frac {\pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{n}-\frac {\pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{n}-\frac {4 \left (x^{n}\right )^{2 i b} c^{2 i b} \left (c^{4 i b} \left (x^{n}\right )^{4 i b} {\mathrm e}^{-3 b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{3 b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{3 b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-3 b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{6 i a}+c^{2 i b} \left (x^{n}\right )^{2 i b} {\mathrm e}^{-2 b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{2 b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-2 b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{4 i a}+{\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}\right )}{b n {\left (\left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}+1\right )}^{4}}-\frac {\ln \left (\left (x^{n}\right )^{2 i b} c^{2 i b} {\mathrm e}^{-b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{-b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )} {\mathrm e}^{2 i a}+1\right )}{b n}\) \(667\)

input
int(tan(a+b*ln(c*x^n))^5/x,x,method=_RETURNVERBOSE)
 
output
1/n/b*(1/4*tan(a+b*ln(c*x^n))^4-1/2*tan(a+b*ln(c*x^n))^2+1/2*ln(1+tan(a+b* 
ln(c*x^n))^2))
 
3.2.74.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 129 vs. \(2 (63) = 126\).

Time = 0.26 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.93 \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {{\left (\cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right )^{2} + 2 \, \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + 1\right )} \log \left (\frac {1}{2} \, \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + \frac {1}{2}\right ) + 4 \, \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + 2}{2 \, {\left (b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right )^{2} + 2 \, b n \cos \left (2 \, b n \log \left (x\right ) + 2 \, b \log \left (c\right ) + 2 \, a\right ) + b n\right )}} \]

input
integrate(tan(a+b*log(c*x^n))^5/x,x, algorithm="fricas")
 
output
-1/2*((cos(2*b*n*log(x) + 2*b*log(c) + 2*a)^2 + 2*cos(2*b*n*log(x) + 2*b*l 
og(c) + 2*a) + 1)*log(1/2*cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + 1/2) + 4* 
cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + 2)/(b*n*cos(2*b*n*log(x) + 2*b*log( 
c) + 2*a)^2 + 2*b*n*cos(2*b*n*log(x) + 2*b*log(c) + 2*a) + b*n)
 
3.2.74.6 Sympy [A] (verification not implemented)

Time = 3.92 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.22 \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\begin {cases} \log {\left (x \right )} \tan ^{5}{\left (a \right )} & \text {for}\: b = 0 \wedge \left (b = 0 \vee n = 0\right ) \\\log {\left (x \right )} \tan ^{5}{\left (a + b \log {\left (c \right )} \right )} & \text {for}\: n = 0 \\\frac {\log {\left (\tan ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )} + 1 \right )}}{2 b n} + \frac {\tan ^{4}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{4 b n} - \frac {\tan ^{2}{\left (a + b \log {\left (c x^{n} \right )} \right )}}{2 b n} & \text {otherwise} \end {cases} \]

input
integrate(tan(a+b*ln(c*x**n))**5/x,x)
 
output
Piecewise((log(x)*tan(a)**5, Eq(b, 0) & (Eq(b, 0) | Eq(n, 0))), (log(x)*ta 
n(a + b*log(c))**5, Eq(n, 0)), (log(tan(a + b*log(c*x**n))**2 + 1)/(2*b*n) 
 + tan(a + b*log(c*x**n))**4/(4*b*n) - tan(a + b*log(c*x**n))**2/(2*b*n), 
True))
 
3.2.74.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 4466 vs. \(2 (63) = 126\).

Time = 0.31 (sec) , antiderivative size = 4466, normalized size of antiderivative = 66.66 \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\text {Too large to display} \]

input
integrate(tan(a+b*log(c*x^n))^5/x,x, algorithm="maxima")
 
output
-1/2*(32*(cos(6*b*log(c))^2 + sin(6*b*log(c))^2)*cos(6*b*log(x^n) + 6*a)^2 
 + 48*(cos(4*b*log(c))^2 + sin(4*b*log(c))^2)*cos(4*b*log(x^n) + 4*a)^2 + 
32*(cos(2*b*log(c))^2 + sin(2*b*log(c))^2)*cos(2*b*log(x^n) + 2*a)^2 + 32* 
(cos(6*b*log(c))^2 + sin(6*b*log(c))^2)*sin(6*b*log(x^n) + 6*a)^2 + 48*(co 
s(4*b*log(c))^2 + sin(4*b*log(c))^2)*sin(4*b*log(x^n) + 4*a)^2 + 32*(cos(2 
*b*log(c))^2 + sin(2*b*log(c))^2)*sin(2*b*log(x^n) + 2*a)^2 + 8*((cos(8*b* 
log(c))*cos(6*b*log(c)) + sin(8*b*log(c))*sin(6*b*log(c)))*cos(6*b*log(x^n 
) + 6*a) + (cos(8*b*log(c))*cos(4*b*log(c)) + sin(8*b*log(c))*sin(4*b*log( 
c)))*cos(4*b*log(x^n) + 4*a) + (cos(8*b*log(c))*cos(2*b*log(c)) + sin(8*b* 
log(c))*sin(2*b*log(c)))*cos(2*b*log(x^n) + 2*a) + (cos(6*b*log(c))*sin(8* 
b*log(c)) - cos(8*b*log(c))*sin(6*b*log(c)))*sin(6*b*log(x^n) + 6*a) + (co 
s(4*b*log(c))*sin(8*b*log(c)) - cos(8*b*log(c))*sin(4*b*log(c)))*sin(4*b*l 
og(x^n) + 4*a) + (cos(2*b*log(c))*sin(8*b*log(c)) - cos(8*b*log(c))*sin(2* 
b*log(c)))*sin(2*b*log(x^n) + 2*a))*cos(8*b*log(x^n) + 8*a) + 8*(10*(cos(6 
*b*log(c))*cos(4*b*log(c)) + sin(6*b*log(c))*sin(4*b*log(c)))*cos(4*b*log( 
x^n) + 4*a) + 8*(cos(6*b*log(c))*cos(2*b*log(c)) + sin(6*b*log(c))*sin(2*b 
*log(c)))*cos(2*b*log(x^n) + 2*a) + 10*(cos(4*b*log(c))*sin(6*b*log(c)) - 
cos(6*b*log(c))*sin(4*b*log(c)))*sin(4*b*log(x^n) + 4*a) + 8*(cos(2*b*log( 
c))*sin(6*b*log(c)) - cos(6*b*log(c))*sin(2*b*log(c)))*sin(2*b*log(x^n) + 
2*a) + cos(6*b*log(c)))*cos(6*b*log(x^n) + 6*a) + 8*(10*(cos(4*b*log(c)...
 
3.2.74.8 Giac [F(-1)]

Timed out. \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\text {Timed out} \]

input
integrate(tan(a+b*log(c*x^n))^5/x,x, algorithm="giac")
 
output
Timed out
 
3.2.74.9 Mupad [B] (verification not implemented)

Time = 32.62 (sec) , antiderivative size = 247, normalized size of antiderivative = 3.69 \[ \int \frac {\tan ^5\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\ln \left (x\right )\,1{}\mathrm {i}+\frac {8}{b\,n\,\left (2\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}+1\right )}-\frac {4}{b\,n\,\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+1\right )}+\frac {4}{b\,n\,\left (4\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+6\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}+4\,{\mathrm {e}}^{a\,6{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,6{}\mathrm {i}}+{\mathrm {e}}^{a\,8{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,8{}\mathrm {i}}+1\right )}-\frac {\ln \left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+1\right )}{b\,n}-\frac {8}{b\,n\,\left (3\,{\mathrm {e}}^{a\,2{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,2{}\mathrm {i}}+3\,{\mathrm {e}}^{a\,4{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,4{}\mathrm {i}}+{\mathrm {e}}^{a\,6{}\mathrm {i}}\,{\left (c\,x^n\right )}^{b\,6{}\mathrm {i}}+1\right )} \]

input
int(tan(a + b*log(c*x^n))^5/x,x)
 
output
log(x)*1i + 8/(b*n*(2*exp(a*2i)*(c*x^n)^(b*2i) + exp(a*4i)*(c*x^n)^(b*4i) 
+ 1)) - 4/(b*n*(exp(a*2i)*(c*x^n)^(b*2i) + 1)) + 4/(b*n*(4*exp(a*2i)*(c*x^ 
n)^(b*2i) + 6*exp(a*4i)*(c*x^n)^(b*4i) + 4*exp(a*6i)*(c*x^n)^(b*6i) + exp( 
a*8i)*(c*x^n)^(b*8i) + 1)) - log(exp(a*2i)*(c*x^n)^(b*2i) + 1)/(b*n) - 8/( 
b*n*(3*exp(a*2i)*(c*x^n)^(b*2i) + 3*exp(a*4i)*(c*x^n)^(b*4i) + exp(a*6i)*( 
c*x^n)^(b*6i) + 1))